home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-06-23 | 1.5 KB | 49 lines |
- import java.applet.*;
- import java.awt.*;
-
- /**
- * An applet that demonstrates HREFiButton.
- * Requires HREFiButton.class
- *
- * @author L. Todd Lowe, ltlowe@achilles.net
- * Last change: LTL 23 Jun 96 12:10 pm
- */
- public class HREFiButtonApplet extends Applet
- {
- HREFiButton b;
-
- /**
- * Initialise the applet. Get the parameters and pass
- * them to HREFiButton().
- *
- * @param href The URL to be loaded when the button is pressed. (From <Applet> tag.)
- * @param frame The frame in which to display the URL (optional). (From <Applet> tag.)
- * @param upImage The image to be displayed when the button is up. (From <Applet> tag.)
- * @param downImage The image to be displayed when the button is pressed. (From <Applet> tag.)
- */
- public void init()
- {
- setLayout( new GridLayout(1,1) );
- b = new HREFiButton( this,
- getParameter("href"),
- getParameter("frame"),
- getParameter("label"),
- getParameter("upImage"),
- getParameter("downImage") );
- add(b);
- }
-
- /**
- * mouseEnter() is needed at the Applet level to
- * prevent Netscape from displaying "Applet is running"
- * every time the mouse moves over the applet.
- * Without this patch/kludge the status updates of the
- * HREFiButton are often overwritten and obscured!
- */
- public boolean mouseEnter(Event e, int x, int y )
- {
- return true;
- }
- }
-
-